/*
 * =====================================================================================
 *
 *       Filename:  queue.cpp
 *
 *    Description:  
 *
 *        Version:  1.0
 *        Created:  2012/3/13 20:54:04
 *       Revision:  none
 *       Compiler:  gcc
 *
 *         Author:  YOUR NAME (), 
 *   Organization:  
 *
 * =====================================================================================
 */
#include <stdlib.h>
#include <stdio.h>
#include <iostream>

#define MAXSIZE 100
using namespace std;

typedef struct{
    int *base;
    int front;
    int rear;
}Queue;
bool init(Queue &Q){
    Q.base = (int *)malloc(MAXSIZE * sizeof(int));
    Q.front = Q.rear = 0;
    return true;
}
void enterQ(Queue &Q, int e){
    Q.base[Q.rear] = e;
    Q.rear = (Q.rear + 1 ) % MAXSIZE;
};
void DeleteQ(Queue &Q,int &e){
    e = Q.base[Q.front];
    Q.front = (Q.front + 1) % MAXSIZE;
}
int main(){
    return 0;
}
